package org.hypnus.e.common.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class ApplicationContextUtil implements ApplicationContextAware {
	
	private static ApplicationContext cxt ;

	@Override
	public void setApplicationContext(ApplicationContext cxt) throws BeansException {
		this.cxt = cxt ;
	}
	
	public static <T> T getBean(String name,Class<T> clazz){
		return cxt.getBean(name, clazz) ;
	}

}
